package com.lp.biz.member.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lp.biz.member.model.entity.Member;
import lombok.Data;

import java.time.LocalDateTime;

import static com.lp.common.constant.CommonConstant.DATE_TIME;
import static com.lp.common.constant.CommonConstant.TIMEZONE;

/**
 * @program: backend
 * @description:
 * @author: Ke.Song
 * @since: 2024-06-22 22:35:12
 */
@Data
public class MemberInvitationList {

    private Integer id;

    private String nickName;

    @JsonFormat(timezone = TIMEZONE, pattern = DATE_TIME)
    private LocalDateTime createAt;

    private Integer status;

    public static MemberInvitationList builder(Member member) {
        MemberInvitationList memberInvitationList = new MemberInvitationList();
        memberInvitationList.setId(member.getId());
        memberInvitationList.setNickName(member.getNickName());
        memberInvitationList.setCreateAt(member.getCreateAt());
        return memberInvitationList;
    }
}
